#coding:utf-8
def joinConf(client,msgType,conference,body):
	client.initConference(body)
	client.conferencesConfigs[body].save()
	client.joinConference(body,client.profile.NICK)
	client.saveConferencesList()
	client.sendMsg(msgType,conference,u"Зашёл")

def leaveConf(client,msgType,conference,body):
	if body in client.conferences:
		client.sendMsg("groupchat",body,u"Я ухожу")
		client.leaveConference(body,u"Сваливаю")
		client.sendMsg(msgType,conference,u"Окай")
	else:
		sendMsg(msgType,conference,u"Нет такой конфы!")

registryCommand(joinConf,u"завались",100,u"Тест на беременность",(u"тест",),CMD_ANY|CMD_PARAM)
registryCommand(leaveConf,u"свали",100,u"Тест на беременность",(u"тест",),CMD_ANY|CMD_PARAM)
